package in.careerscale.apps.ocms.dao.model;

// Generated Jul 7, 2013 10:49:55 AM by Hibernate Tools 4.0.0

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

/**
 * UserProfile generated by hbm2java
 */
@Entity
@Table(name = "user_profile", catalog = "ocms")
public class UserProfile implements java.io.Serializable {

	private int id;
	private LoginMaster loginMaster;
	private Address address;
	private String otherEmailId;
	private String bloodGroup;
	private Date anniversary;
	private Boolean monthlyUpdates;
	private Boolean specialUpdates;
	private Boolean regularUpdates;
	private String mobileNumber1;
	private String mobileNumber2;
	private String landlineNumber;

	public UserProfile() {
	}

	public UserProfile(LoginMaster loginMaster, String otherEmailId,
			String bloodGroup) {
		this.loginMaster = loginMaster;
		this.otherEmailId = otherEmailId;
		this.bloodGroup = bloodGroup;
	}

	public UserProfile(LoginMaster loginMaster, Address address,
			String otherEmailId, String bloodGroup, Date anniversary,
			Boolean monthlyUpdates, Boolean specialUpdates,
			Boolean regularUpdates, String mobileNumber1, String mobileNumber2,
			String landlineNumber) {
		this.loginMaster = loginMaster;
		this.address = address;
		this.otherEmailId = otherEmailId;
		this.bloodGroup = bloodGroup;
		this.anniversary = anniversary;
		this.monthlyUpdates = monthlyUpdates;
		this.specialUpdates = specialUpdates;
		this.regularUpdates = regularUpdates;
		this.mobileNumber1 = mobileNumber1;
		this.mobileNumber2 = mobileNumber2;
		this.landlineNumber = landlineNumber;
	}

	@GenericGenerator(name = "generator", strategy = "foreign", parameters = @Parameter(name = "property", value = "loginMaster"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@PrimaryKeyJoinColumn
	public LoginMaster getLoginMaster() {
		return this.loginMaster;
	}

	public void setLoginMaster(LoginMaster loginMaster) {
		this.loginMaster = loginMaster;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "address_id")
	public Address getAddress() {
		return this.address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}

	@Column(name = "other_email_id", nullable = false, length = 100)
	public String getOtherEmailId() {
		return this.otherEmailId;
	}

	public void setOtherEmailId(String otherEmailId) {
		this.otherEmailId = otherEmailId;
	}

	@Column(name = "blood_group", nullable = false, length = 10)
	public String getBloodGroup() {
		return this.bloodGroup;
	}

	public void setBloodGroup(String bloodGroup) {
		this.bloodGroup = bloodGroup;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "anniversary", length = 19)
	public Date getAnniversary() {
		return this.anniversary;
	}

	public void setAnniversary(Date anniversary) {
		this.anniversary = anniversary;
	}

	@Column(name = "monthly_updates")
	public Boolean getMonthlyUpdates() {
		return this.monthlyUpdates;
	}

	public void setMonthlyUpdates(Boolean monthlyUpdates) {
		this.monthlyUpdates = monthlyUpdates;
	}

	@Column(name = "special_updates")
	public Boolean getSpecialUpdates() {
		return this.specialUpdates;
	}

	public void setSpecialUpdates(Boolean specialUpdates) {
		this.specialUpdates = specialUpdates;
	}

	@Column(name = "regular_updates")
	public Boolean getRegularUpdates() {
		return this.regularUpdates;
	}

	public void setRegularUpdates(Boolean regularUpdates) {
		this.regularUpdates = regularUpdates;
	}

	@Column(name = "mobile_number1", length = 20)
	public String getMobileNumber1() {
		return this.mobileNumber1;
	}

	public void setMobileNumber1(String mobileNumber1) {
		this.mobileNumber1 = mobileNumber1;
	}

	@Column(name = "mobile_number2", length = 20)
	public String getMobileNumber2() {
		return this.mobileNumber2;
	}

	public void setMobileNumber2(String mobileNumber2) {
		this.mobileNumber2 = mobileNumber2;
	}

	@Column(name = "landline_number", length = 20)
	public String getLandlineNumber() {
		return this.landlineNumber;
	}

	public void setLandlineNumber(String landlineNumber) {
		this.landlineNumber = landlineNumber;
	}

}
